// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import Vuex from 'vuex'
import router from './router'
import VueResource from 'vue-resource'
import Vuelazyload from 'vue-lazyload'




import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import animate from 'vue2-animate/dist/vue2-animate.min.css'
// import axios from 'axios'
// import VueAxios from 'vue-axios'

Vue.use(MintUI)
// Vue.use(VueAxios, axios)
Vue.use(Vuex)
Vue.use(animate)
Vue.config.productionTip = false
Vue.use(VueResource);
/* eslint-disable no-new */

Vue.use(Vuelazyload,{
    loading:'../static/loading/puff.svg'

})


// 定义vuex仓库存储共用的状态
export const store = new Vuex.Store({
    state:{
       username1:'',
       cartCount:0
    },
    mutations:{
        upDateUserName(state,username1){
           state.username1 = username1;
        },
        upDateCartCount(state,cartCount){
           state.cartCount += cartCount;
        }
    }
})



new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
